<table class="list" cellpadding=3>
	<tbody>
	<tr><th colspan=7 style='height: 3cm'><h3>Missione : <?php echo $missione['nome']; ?></h3></tr>
	<tr><th colspan=7 style='height: 1cm; border-bottom: thin solid #000000'><h4>Introiti <?php echo $nome_mese[ $mese ] . " - " . $anno ?></h4></tr>
	<tr><th colspan=7 style='height: 1cm'><b><u>Offerte per sostenitore</u></b></tr>
		<tr>
				<th style="border-bottom: 1px solid #000"><?php echo __("ID Adozione", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Info", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Sostenitore", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Destinatario", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Categoria", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Importo", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Conto", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Note", $module) ?></th>
		</tr>
<?php if ($rows1) : ?>
<?php $totale = 0; ?>
<?php $i = 0; foreach ($rows1 as $row): ?>
<?php if ($i % 2 != 0): $rowClass = 'odd'; else: $rowClass = 'even'; endif;?>
<?php $totale += $row['importo'] ?>
		<tr class="<?php echo $rowClass?>">
				<td><?php echo $row['id_adozione'] ?></td>
				<td background="yellow"><?php echo $row['info'] ?></td>
				<td><?php echo  $row['sostenitore'] ?></td>
				<td><?php  echo  $row['destinatario'] ?></td>
				<td><?php echo $row['categoria'] ?></td>
				<td align="right"><?php echo format_euro($row['importo']) ?></td>
				<td><?php echo $row['conto'] ?></td>
				<td><?php echo $row['note'] ?></td>
				
		</tr>
<?php $i++; endforeach; ?>
<tr><th colspan=4 style="border-top: 1px solid #000">Totale</th><td align='right' class='total' style="border-top: 1px solid #000"><?php echo format_euro($totale) ?></td><td colspan='2' style="border-top: 1px solid #000">&nbsp;</td></tr>
<?php endif; ?>
	<tr><th colspan=8 style='height: 1cm'>&nbsp;</th></tr>
	<tr><th colspan=8 style='height: 1cm'><b><u>Offerte per destinatario</u></b></tr>
		<tr>
				<th style="border-bottom: 1px solid #000"><?php echo __("Sostenitore", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Destinatario", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Categoria", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Importo", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Conto", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Info", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("ID Adozione", $module) ?></th>
				<th style="border-bottom: 1px solid #000"><?php echo __("Note", $module) ?></th>
		</tr>
<?php if ($rows2) : ?>
<?php $totale = 0; ?>
<?php $i = 0; foreach ($rows2 as $row): ?>
<?php if ($i % 2 != 0): $rowClass = 'odd'; else: $rowClass = 'even'; endif;?>
<?php $totale += $row['importo'] ?>
		<tr class="<?php echo $rowClass?>">
				<td><?php echo  $row['sostenitore'] ?></td>
				<td><?php  echo  $row['destinatario'] ?></td>
				<td><?php echo $row['categoria'] ?></td>
				<td align="right"><?php echo format_euro($row['importo']) ?></td>
				<td><?php echo $row['conto'] ?></td>
				<td><?php echo $row['info'] ?></td>
				<td background="yellow"><?php echo $row['id_adozione'] ?></td>
				<td><?php echo $row['note'] ?></td>
				
		</tr>
<?php $i++; endforeach; ?>
<tr><th colspan=3 style="border-top: 1px solid #000">Totale</th><td align='right' class='total' style="border-top: 1px solid #000"><?php echo format_euro($totale) ?></td><td colspan='3' style="border-top: 1px solid #000">&nbsp;</td></tr>
<?php endif; ?>

</tbody>
</table>	
